import React, { Component } from 'react'


export default class App extends Component {
	constructor() {
		super();
		this.state = {
			cart: {}
		}
	}

	save = () => {
		const goods_name = this.refs.goods_name.nodeValue
		this.state.cart
	}

	render() {
		return (
			<div>
				商品: <input type="text" ref="goods_name" /><br />
				数量: <input type="number" ref="count" /><br />
				<button onClick={this.save}>保存</button>
			</div>
		)
	}
}
